package com.huobi.web;

import com.huobi.db.mapper.ConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class MainController {

    @Autowired
    ConfigMapper configMapper;

    @GetMapping("/index")
    public String index(ModelMap modelMap){
        modelMap.put("title",configMapper.findByKey("site.title"));
        return "index";
    }

}
